<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!--Hier fuegt man seinen Arbeitsgeber  oder Firmennamen ein und beschreibt von wann bis wann man in der Firma gearbeitet hat... -->
<%String file="./index.jsp?"+Constant.CONTENT+"="+Constant.add_work, method="get"; %>
<%@page import="db.DBMain"%>
<%RequestParser.send_action_file=file;
RequestParser.send_method=method;%>
<%@include file="town.jsp" %>
<%@page import="html.RequestParser"%>
<%@page import="db.tables.DBWorkTable"%>
<script type="text/javascript"><!--

<%
RequestParser workParser=new RequestParser(request,file,method);
workParser.isAdmin(true);
workParser.setAdd(Constant.Content.ADD_WORK);
workParser.setContent(Constant.Content.WORK);
workParser.setSubmit(Constant.Content.SUBMIT_WORK);
workParser.setDelete(Constant.Content.DELETE_WORK);
workParser.setInput(new String[]{Constant.Content.INPUT_WORK,Constant.Content.TOWN});
workParser.setInsert_columns(new String[]{DBWorkTable.WORK_NAME_COL,DBWorkTable.TOWN_ID_COL});
workParser.setDisplay_columns(new String[]{DBWorkTable.WORK_ID_COL,DBWorkTable.WORK_NAME_COL});
workParser.setPk_column(DBWorkTable.WORK_ID_COL);
workParser.setTable(DBMain.getWorkTable());
workParser.setFk_column(DBWorkTable.TOWN_ID_COL);
workParser.setFk_id(town_id);
workParser.process();

%>
//
--></script>
<form name="<%=workParser.getContent() %>" action="<%=workParser.getSend_action_file() %>" method="<%=workParser.getSend_method()%>">
	<select name="<%=workParser.getContent() %>" onchange="submit()">
		<%
			workParser.printOptionList(out);
		%>
	</select>
<% if(admin) { %>
    <input type="hidden" name="<%=Constant.Content.COUNTRY %>" value="<%=country_id %>"/>
	<input type="hidden" name="<%=Constant.Content.TOWN %>" value="<%=town_id %>"/> 
	<input name="<%=workParser.getDelete() %>" value="<%=Constant.Content.DELETE %>" type="submit"/>
<% } %>
<% if(admin) { %>
	<table>
	<tr><td>Arbeitgeber</td></tr>
	<tr>
	<td><input name="<%=workParser.getInput()[0] %>" type="text"/></td>
	</tr></table>
    <input type="hidden" name="<%=workParser.getContent() %>" value="<%=workParser.getPk_id()%>"/>
    <input type="hidden" name="<%=Constant.Content.COUNTRY %>" value="<%=country_id %>"/>
	<input type="hidden" name="<%=Constant.Content.TOWN %>" value="<%=town_id %>"/> 
	<input name="<%=workParser.getSubmit() %>" type="submit"/>
	<input type="reset" name="Zur&uuml;cksetzen" value="Zur&uuml;cksetzen">
</form>
<%}%>